const { exec } = require('child_process');

function cmd(string) {
  console.log('Execute the order: ', string)
  const build = exec(string, {windowsHide: false}, (err, stdout, stderr) => {
    if (err) {
      console.error(err)
      return
    }
    console.log('stdout=', stdout)
    console.log('')
    console.log('build finished')
  });
  build.stdout.on('data', data => console.log(data))
}

cmd('cd learn-vue3-vite-js && npm run dev')
